package iul.teste;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebSettings.ZoomDensity;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class WebViewActivity extends Activity {

	private WebView webView;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.webview);

		webView = (WebView) findViewById(R.id.webView1);
		webView.getSettings().setJavaScriptEnabled(true);

		webView.setWebViewClient(new WebViewClient() {
			@Override
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				return super.shouldOverrideUrlLoading(view, url);
			}
		});

		/**
		String playVideo= "<iframe class=\"youtube-player\" type=\"text/html\" width=\"240\" height=\"120\" " +
				"src=\"http://www.youtube.com/embed/bIPcobKMB94\" frameborder=\"0\">";

		 **/
		String playVideo = "<object width=\"560\" height=\"315\"><param name=\"movie\" " +
				"value=\"http://www.youtube.com/v/ZTkuozIwhjI?version=3&amp;hl=pt_PT\">" +
				"</param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\"" +
				" value=\"always\"></param><embed src=\"http://www.youtube.com/v/ZTkuozIwhjI?version=3&amp;hl=pt_PT\"" +
				" type=\"application/x-shockwave-flash\" width=\"560\" height=\"315\" allowscriptaccess=\"always\"" +
				" allowfullscreen=\"true\"></embed></object>";

		webView.loadData(playVideo, "text/html", "utf-8");




		//		webView.loadUrl("http://www.youtube.com/embed/bIPcobKMB94?autoplay=1&html5=True");
		//		webView.getSettings().setDefaultZoom(ZoomDensity.FAR);
		webView.zoomOut();
		webView.zoomOut(); 
		webView.zoomOut();


		//		webview_settings.setUseWideViewPort(true);
		//		webview_settings.setBuiltInZoomControls(true);

	}




}